package com.itheima.idea;

import java.util.Scanner;

public class Demo3String {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入:");
        String s = sc.nextLine();
        StringBuilder sb = new StringBuilder(s);
        sb.append("红中红中").append("白板白板");

        System.out.println(sb);
        sb.reverse();
        System.out.println(sb);
        System.out.println("sb中的字符个数:" + sb.length());

        sb.reverse();
        String s2 = sb.toString();
        System.out.println(s2);
    }
}
